package jhlee42;

import java.util.Scanner;

public class J10Account {
	public static void main(String[] args) {
		
		double aid;
		double balance; 
		double interestRate;
		String dateCreated;
		double getMonthlyInterestRate;
		double depositWithDraw;
		double inOutSelect;
		
		
		Scanner sc = new Scanner(System.in);
		System.out.println("계좌번호를 입력해주세요..");
		aid = sc.nextInt();
		System.out.println("출금 = 0, 입금 = 1 을 누르세요");
		inOutSelect = sc.nextInt();
		if(inOutSelect==0){System.out.println("출금하실 금액을 입력해주세요");}
		else {System.out.println("입금하실 금액을 입력해주세요");}
		depositWithDraw = sc.nextInt();
		
		dateCreated= "2014-03-10";
		balance = 1000000; // 잔액
		interestRate = 4.5; // 연이율
		
		

		interestRate(interestRate);
		getcal(inOutSelect,balance,depositWithDraw);
	
	
		System.out.println("---------------------");
		System.out.println(aid[1]);
		System.out.println(interestRate[1]);
		System.out.println(dateCreated[1]);
		System.out.println(deposit[1]);
		System.out.println(withDraw[1]);
		System.out.println(getMonthlyInterestRate[1]);
		System.out.println(balance[1]);

	}
	
	
	public static double interestRate(double interestRate){
		return interestRate / 12;
	}
	
	public static double getcal(double inOutSelect ,double balance,double depositWithDraw){
		getMonthlyInterestRate = (interestRate / 12);
		
		if (inOutSelect==0) {return balance - depositWithDraw;} // 출금}
		else {return balance + depositWithDraw; // 입금}
	}
	
	
	
	

	
/*	public static void exam_1(int[] aid, int[] balance, double[] interestRate,int[] withDraw){
		aid[1] = 1122; // 계좌번호
		balance[1] = 20000; // 잔액
		interestRate[1] = 4.5; // 연이율
		withDraw[1] = 2500;
	}
	public static void exam_2(int[] aid, int[] balance, double[] interestRate,int[] withDraw){
		aid[1] = 1122; // 계좌번호
		balance[1] = 20000; // 잔액
		interestRate[1] = 4.5; // 연이율
		withDraw[1] = 3000;
	}*/
	
	
}
